<div class="row txtTitle">

    <div class="form-group pull-left form-span " (click)="openSearch()" style="line-height: 30px;margin-right: 5px;margin-bottom: 0px;">
        <a href="javascript:;" class="animate-time opensearcha">{{opensearchtitle}}</a>
        <img class="animate-time" [ngClass]="{ 'down': opensearch , 'up': !opensearch}" height="20px" width="20px" src="assets/indexing/zk.png">
    </div>

    <input matInput type="text" *ngIf="right['keywordTrial']['query']" class="input_style" style="width:250px;" #queryCriteria="ngModel" name="searchData" placeholder="请输入主题词名称"
        (input)="changesearch()" (keyup.enter)="changesearch()" [(ngModel)]="searchData" />
    <button class="btn btn-search btn-blue" *ngIf="right['keywordTrial']['query']" style="margin-right: 10px;" (click)="search()" mat-button>查询</button>

  <button class="btn btn-blue" mat-button data-toggle="modal" data-target="#add" 
    (click)="initService._init(1);_addList();"
    *ngIf="right['keywordTrial']['create']"
    >新增</button>

    <button class="btn btn-green" mat-button
    data-toggle="modal" 
    [disabled]="removeTableService?._isEmpty()" 
    *ngIf="checkStatus === 0 && right['keywordUnreviewed']['batchReview']"
    data-target="#keywordCheckStatus"
    (click)="changeCheckStatus(1)"
    >审核</button>

    <button class="btn btn-orange" mat-button
    data-toggle="modal" 
    [disabled]="removeTableService?._isEmpty()" 
    *ngIf="checkStatus === 1 && right['keywordTrial']['batchCancelReview']"
    data-target="#keywordCheckStatus"
    (click)="changeCheckStatus(0)"
    >取消审核</button>

    <button class="btn btn-orange" mat-button
    data-toggle="modal" 
    [disabled]="removeTableService?._isEmpty()" 
    data-target="#keywordDelete"
    *ngIf="checkStatus === 0 && right['keywordUnreviewed']['batchDelete']"
    >删除</button>

    <button class="btn btn-green" mat-button
    [disabled]="removeTableService?._isEmpty()" 
    (click)="_enable()"
    *ngIf="right['keywordTrial']['batchEnable']"
    >启用</button>

    <button class="btn btn-orange" mat-button
    [disabled]="removeTableService?._isEmpty()" 
    (click)="_disable()"
    *ngIf="right['keywordTrial']['batchDisable']"
    >禁用</button>

    <button class="btn btn-blue" mat-button
    [disabled]="removeTableService?._isEmpty()" 
    *ngIf="checkStatus === 0"
    style="display:none;"
    >移动</button>

    <button class="btn btn-blue" mat-button
     *ngIf="checkStatus === 1 && right['keywordTrial']['exportTrialTheme']"
     data-toggle="modal" 
     data-target="#keywordExport"
     (click)="initService._init(1);_clickExport()"
     [disabled]="false"
    >送发布</button>

    <button class="btn btn-blue" mat-button
    *ngIf="checkStatus === 1 && right['keywordTrial']['importTrialTheme']"
    data-toggle="modal" 
    data-target="#keywordImport"
    (click)="initService._init(1);"
    >上传</button>

    <button class="btn btn-blue" mat-button
     *ngIf="checkStatus === 1 && right['keywordTrial']['download']"
     data-toggle="modal" 
     data-target="#keywordDownload"
     (click)="initService._init(1);_clickDownload()"
    >下载</button>

    <button class="btn btn-blue" mat-button
    *ngIf="checkStatus === 1 && right['keywordTrial']['DownloadTemplate']"
    data-toggle="modal" 
    data-target="#downloadThemeTemplate"
    (click)="initService._init(1);"
    >下载模板</button>

</div>

<div class="row txtTitle themeSearch animate-time" *ngIf="right['keywordTrial']['query']" [ngClass]="{ 'opens': opensearch , 'closes': !opensearch}">
    <div class="form-group pull-left">
        <span class="pull-left form-span span_left_search">启用状态：</span>
        <select class="form-control select-style" name="status" (change)="search()" [(ngModel)]="status">
            <option value="">全部</option>
            <option value="0">启用</option>
            <option value="-1">禁用</option>
        </select>
    </div>

    <div class="form-group pull-left">
        <span class="pull-left form-span span_left_search">标签：</span>
        <select class="form-control select-style" name="labelId" (change)="search()" [(ngModel)]="labelId">
            <option value="">全部</option>
            <option *ngFor="let val of themeTagListVal" value="{{ val.labelId }}">{{ val.labelName }}</option>
        </select>
    </div>
</div>


<!-- 审核提示 -->
<div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" data-keyboard="false" data-backdrop="static"
    aria-labelledby="myModalLabel" aria-hidden="true" id="keywordCheckStatus">
    <div class="modal-dialog delete-modal modal-dialog-centered">
        <div class="modal-content" *ngIf="changeCheck === 0">
            <div class="modal-header">
                <h4 class="modal-title text-center">审核提示</h4>
            </div>
            <div class="modal-body text-center">
                <p class="delete-prompt">请确认是否取消审核！</p>
            </div>
            <div class="modal-footer" style="width: 100%;">
                <button type="button" class="btn btn-primary" data-dismiss="modal" (click)="_review(0)">确认</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
        <div class="modal-content" *ngIf="changeCheck === 1">
            <div class="modal-header">
                <h4 class="modal-title text-center">审核提示</h4>
            </div>
            <div class="modal-body text-center">
                <p class="delete-prompt">请确认是否通过审核！</p>
            </div>
            <div class="modal-footer" style="width: 100%;">
                <button type="button" class="btn btn-primary" data-dismiss="modal" (click)="_review(1)">通过</button>
                <!-- 点击不通过设置状态 (click)="_review(-1)" -->
                <button type="button" class="btn btn-default" data-dismiss="modal">不通过</button>
            </div>
        </div>
    </div>
</div>
<!-- 审核提示 -->

<!-- 下载模板提示 -->
<div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" data-keyboard="false" data-backdrop="static"
    aria-labelledby="myModalLabel" aria-hidden="true" id="downloadThemeTemplate">
    <div class="modal-dialog delete-modal modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title text-center">下载提示</h4>
            </div>
            <div class="modal-body text-center">
                <p class="delete-prompt">请确认是否下载主题词模板！</p>
            </div>
            <div class="modal-footer" style="width: 100%;">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal" (click)="download()">确认</button>
            </div>
        </div>
       
    </div>
</div>
<!-- 下载模板提示 -->